#pragma once

#include "ScriptCompiler/AST/SentenceNode.h"

class CScriptToken;
class CCaseNode;
class CSentenceBlockNode;
class CExpressionNode;

class CSwitchNode : public CSentenceNode
{
public:
    CSwitchNode(std::weak_ptr<CScriptFileContext> InFile)
        : CSentenceNode(InFile, EASTNodeType::Switch)
    {
    }

    //switch
    std::shared_ptr<CScriptToken> Switch;

    //switch value
    std::shared_ptr<CExpressionNode> Value;

    //cases
    TVector<std::shared_ptr<CCaseNode>> Cases;

    //default case
    std::shared_ptr<CSentenceBlockNode> DefaultCase;

    virtual void DebugPrint(int32_t InDepth) override;

    virtual std::shared_ptr<CScriptToken> GetFirstToken() override;
};